package com.yanqu.road.logic.bussiness.config;

import com.yanqu.road.entity.goods.MallRandomGoods;
import com.yanqu.road.logic.bussiness.DaoHelper;
import com.yanqu.road.entity.config.goods.GoodsBagInfo;
import com.yanqu.road.entity.config.goods.GoodsCompose;
import com.yanqu.road.entity.config.goods.GoodsInfo;

import java.util.List;
import java.util.Map;

public class GoodsBussiness {

	public static Map<Integer, GoodsInfo> getGoodsInfoMap() {
		return DaoHelper.getGoodsDaoImpl().getGoodsInfoMap();
	}

	public static Map<Integer, Map<Integer, List<GoodsBagInfo>>> getGoodsBagInfoMap() {
		return DaoHelper.getGoodsDaoImpl().getGoodsBagInfoMap();
	}

	public static Map<Integer, GoodsCompose> getGoodsComposeMap() {
		return DaoHelper.getGoodsDaoImpl().getGoodsComposeMap();
	}

	public static Map<Integer, MallRandomGoods> getMallRandomGoods(){
		return DaoHelper.getMallRandomGoodsDaoImpl().getGoodsInfoMap();
	}

	public static boolean addMallRandomGoods(MallRandomGoods mallRandomGoods){
		return DaoHelper.getMallRandomGoodsDaoImpl().add(mallRandomGoods);
	}

	public static  boolean updateMallRandomGoods(MallRandomGoods mallRandomGoods){
		return DaoHelper.getMallRandomGoodsDaoImpl().update(mallRandomGoods);
	}

}
